import { request } from '@boeyo/portal';

/**
 * 项目下拉列表
 * @ss.hasPermi('manufacturer:selectList')
 */
export const projectSelectList = () => {
  return request({
    url: 'project/selectList',
    method: 'GET',
  });
};

/**
 * 监测列表树形列表
 * null
 */
export const fetchStructureTree = (data = {}) => {
  return request({
    url: '/monitoring/tree',
    method: 'POST',
    data,
  });
};

/**
 * 获取省市区
 * null
 */
export const getAreaCode = (params = {}) => {
  return request({
    url: '/chinaArea/getAreaCode',
    method: 'GET',
    params,
  });
};

/**
 * 新增或修改监测结构
 * null
 */
export const createAndUpdateStructure = (data) => {
  return request({
    url: '/monitoring/addOrUpdate',
    method: 'POST',
    data,
  });
};

/**
 * 删除监测结构
 * null
 */
export const deleteMonitor = (id) => {
  return request({
    url: `/monitoring/delete/${id}`,
    method: 'POST',
  });
};
